/**
 * 通用接口
 */
import request from "@/utils/request";
let api = {};

// 首页统计数据
api.dashboard = function (data = {}) {
  return request({
    url: "/admin/dashboard",
    method: "get",
    params: data,
  });
};
//上传
api.upload = function (e) {
  let formdata = new FormData();
  formdata.append("file", e.file);
  return request({
    url: "/admin/common/upload",
    method: "post",
    data: formdata,
  });
};

export default api;
